package com.ysz.globalexception.components;

import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @ClassName BusinessException
 * @Description TODO
 * @Data 13:13
 * @Version 1.0
 * @Author ysz
 */
public class BusinessException extends BaseException {
    private Object data;

    public BusinessException(Throwable cause, Integer code, String msg, Object data) {
        super(cause, code, msg);
        this.data = data;
    }

    public BusinessException(Integer code, String msg, Object data) {
        super(code, msg);
        this.data = data;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
